getDistanceJoint = () => {
    var prefabIndex = 0;
    for (var i = 0; i < global.UnityNode.length; i++) {
        var d = global.UnityNode[i];
      for (var j = 0; j < d.DistanceJoint.length; j++) {
        if (d.DistanceJoint[j].Add) {
          var nodeId = d.ID;
          var x = d.DistanceJoint[j].Anchor.x;
          var y = d.DistanceJoint[j].Anchor.y;
          prefabIndex++;
          global.curID++;
          global.finialInfo.push(DistanceJoint(nodeId, x, y));
        }
      }
    }
}
DistanceJoint = (nodeId,x,y) => {
    var d = {
        "__type__": "cc.DistanceJoint",
        "_name": "",
        "_objFlags": 0,
        "node": {
          "__id__": nodeId
        },
        "_enabled": true,
        "anchor": {
          "__type__": "cc.Vec2",
          "x": x,
          "y": y
        },
        "connectedAnchor": {
          "__type__": "cc.Vec2",
          "x": 0,
          "y": 0
        },
        "connectedBody": null,
        "collideConnected": false,
        "_distance": 1,
        "_frequency": 0,
        "_dampingRatio": 0,
        "_id": ""
    }
    if (global.isShowId) d["ID"] = global.curID;
    return d;
}
module.exports = {
    getDistanceJoint,
};